/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package kotionokyurievna.gmail.com.threadjoinvolatile.logic;

/**
 *
 * @author Kateryna_Reznik
 */
public class AddSinCalculator{
    private SimpleCalculator simpleCalculator;
    
    public AddSinCalculator(){
        simpleCalculator = new SimpleCalculator();
    }
    
    public double addSin ( int[] argsArray ){
        double sum = 0;
        for ( double item: argsArray){
            sum = simpleCalculator.add(sum, simpleCalculator.sin(item));
        }
        return sum;
    }
        
    public String toString(){
        return getClass().getName();
    }
    
}
